const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
    devServer: {
        host: '0.0.0.0',
        // https:true,
        port: 6103,
        client: {
            webSocketURL: 'ws://0.0.0.0:6103/ws',
        },
        headers: {
            'Access-Control-Allow-Origin': '*',
        },
        proxy: {
            //     配置代理名字
            // '/abc': {
            //     // https://course.myhope365.com/api/abc/weChat/applet/course/banner/list
            //     // https://course.myhope365.com/api/weChat/applet/course/banner/list
            //     // 代理路径
            //     target: 'https://course.myhope365.com/api',
            //     //  是否跨域
            //     changeOrigin: true,
            //     //     路径重写
            //     pathRewrite:{
            //         '^/abc':''
            //     }
            // },
            '/api': {
                // https://course.myhope365.com/api/weChat/applet/course/banner/list
                // https://course.myhope365.com/api/weChat/applet/course/banner/list
                // 代理路径
                target: 'https://course.myhope365.com',

                //  是否跨域
                changeOrigin: true,
                //     路径重写
                // pathRewrite:{
                //     '^/api':''
                // }
            },
        }
    },
    transpileDependencies: true,
    css: {
        loaderOptions: {
            less: {
                lessOptions: {
                    // If you are using less-loader@5 please spread the lessOptions to options directly
                    modifyVars: {
                        'primary-color': '#1DA57A',
                        'link-color': '#1DA57A',
                        'border-radius-base': '2px',
                    },
                    javascriptEnabled: true,
                },
            },
        },
    },
})
module.exports = {
    lintOnSave: false,
}

